package newtank.utils;

import newtank.view.PaintView;

/**
 * @author lijiahao
 * @since 2022/3/18
 */
public class OperatorUtils {

    public static void operatorView(PaintView paintView, String operatorType) {
        switch (operatorType) {
            case "1":
                paintView.turnUp();
                paintView.move();
                break;
            case "2":
                paintView.turnDown();
                paintView.move();
                break;
            case "3":
                paintView.turnLeft();
                paintView.move();
                break;
            case "4":
                paintView.turnRight();
                paintView.move();
                break;
            default:
                break;
        }
    }

    public static void operatorView(PaintView paintView, int operatorType) {
        switch (operatorType) {
            case 1:
                paintView.turnUp();
                paintView.move();
                break;
            case 2:
                paintView.turnDown();
                paintView.move();
                break;
            case 3:
                paintView.turnLeft();
                paintView.move();
                break;
            case 4:
                paintView.turnRight();
                paintView.move();
                break;
            default:
                break;
        }
    }

}
